The present invention relates to a method of controlling an electric discharge machine in which an electrode and a workpiece are moved relative to each other to perform electric discharge machining in the workpiece, more particularly, it relates to a method of controlling an electric discharge machine well-suited for application to retraction control of the electrode.
Electric discharge machines include: (1) a wire-cut electric discharge machine wherein a wire electrode is moved relative to a workpiece along a commanded path, thereby to perform electric discharge machining; and (2) an electric discharge machine wherein an electrode of a predetermined shape, located near a workpiece, is moved in a cutting direction and an electric discharge is caused between the electrode and the workpiece, thereby to machine the workpiece to the same shape as the electrode.
FIG. 1 is a schematic explanatory view of the latter electric discharge machine. An electrode EP serving as a punch is supported by a spindle SP, and is fed, for machining in the direction of the arrow, by a servomotor (not shown). A voltage is applied by a power source PS connected to the electrode EP and a workpiece WK, which is to be machined into a die. Accordingly, when the electrode EP is advanced while a minute gap is maintained between the workpiece WK and the electrode EP, the workpiece WK is machined into a shape similar to that of the electrode EP. An enlarged bore of a desired size can be readily machined in the workpiece WK by controlling, e.g., the machining pulses and energy. If necessary, the machining operation is carried out while the electrode EP is being moved in eccentric fashion, whereby an enlarged bore of any desired dimensions can be machined.
In such an electric discharge machine, when the electrode has come into contact with the workpiece or when debris is to be removed, the electrode must be retracted along the machined path. To this end, all the conventional electric discharge machines have a retraction control function. The retraction control conditions such as retraction speed, retractable limit and a speed for advancing the electrode again after the retraction are set as parameters by the use of a manual data input device (MDI), a keyboard or the like when the machining state or the machining method has changed. Each time retraction control is required, the parameters are read to carry out the control. In this regard, only one class of fixed retraction control conditions are set in the conventional electric discharge machines. This leads to the disadvantage in that during machining operations based on one machining command program, only one class of retraction control conditions can be set, so the optimum retraction control cannot be performed. The reasons are that in the machining based on one machining command program, the depth of cut changes every moment (the change of the machining state), so the retraction control conditions comprising a retraction distance etc. need to be altered according to the depth of cut, and even in case of machining based on the identical machining command program, the machining method differs depending upon the material of the workpiece, etc., so the retraction control conditions require alteration.
FIGS. 2(a) and 2(b) are diagrams for explaining the fact that the retractable limit must be changed depending upon the depth of cut.
In a case where debris is to be removed, when the depth of cut is small as shown in FIG. 2(a), the debris can be removed easily even if the gap between the electrode EP and the workpiece WK is small because of a small retraction distance. In contrast, when the depth of cut is great as shown in FIG. 2(b), the debris cannot be removed unless a large gap is provided by retraction over a large distance. Moreover, setting a retractable limit for the case of the deep cut, as illustrated in FIG. 2(b), in a situation where the cut is shallow, as illustrated in FIG. 2(a), can give rise to a dangerous condition for the following reason. Electric discharge machining takes place in a working fluid, which is oil lin many cases. If, in the case of the shallow cut, the electrode retreats the same distance as in the case of the deep cut, it might rise above the surface of the working fluid. This can pose the danger of fire. For the above reasons, the retractable limit needs to be controlled according to the position or depth of cut as illustrated in FIG. 3. In FIG. 3, the vertical axis represents the speed of the electrode, while the horizontal axis represents the position of the electrode. A solid line corresponds to the case of the shallow cut where a retraction distance L.sub.1 extends from a position P.sub.0 to a position P.sub.2. On the other hand, a dotted line corresponds to the case of the deep cut where a retraction distance L.sub.2 extends from the position P.sub.0 to a position P.sub.1. Further, symbol V.sub.R denotes the speed for retracting the electrode, symbol V.sub.F the high speed for advancing the electrode after the retraction, and symbol V.sub.F ' the low speed for advancing the electrode.
Moreover, when the retracting speed and the re-advancing speed are held constant irrespective of retractable limits, the retraction control time becomes long for a large retractable limit, resulting in a low machining efficiency. In order to shorten the machining time, therefore, the retracting and re-advancing speeds for the large retractable limit need to be made higher as illustrated in FIG. 4. In this figure, a solid line corresponds to the case of a small retractable limit where the retracting speed is V.sub.R1 and the high advancing speed is V.sub.F1, and a dotted line corresponds to the case of the large retractable limit where the retracting and re-advancing speeds are V.sub.R2 and V.sub.F2, respectively. With some machining methods or under some machining conditions, only the speeds must be made unequal with the retractable limits held equal, as indicated by a solid line and a dotted line in FIG. 5.
As described above, the prior-art method of controlling the electric discharge machine, in which one class of retraction control conditions are set, cannot execute retraction control which adopts to the changes in the state of electric discharge machining. Therefore, problems have been encountered wherein the electrode rises above the working fluid surface to pose the danger of fire, the electrode cannot be retracted a sufficient distance, and the machining efficiency declines.